const state = {
    poem: {},
    poemBeatSeconds: {},
}
const getters = {
    //获取诗歌对象
    getPoem(state) {
        return state.poem
    },
    //获取用户点击节奏
    gerPoemBeatSeconds(state) {
        return state.poemBeatSeconds
    }
};
const mutations = {
    //初始化诗歌对象
    setPoem(state, param) {
        state.poem = param
        if (param.record) state.poemBeatSeconds = param.record.value.poemBeatSeconds
    },
    setPoemBeatSeconds(state, param) {
        state.poemBeatSeconds = param
    }
};
const actions = {
    setPoem({ commit }, param) {
        commit("setPoem", param)
    },
    setPoemBeatSeconds({ commit }, param) {
        commit("setPoemBeatSeconds", param)
    }
};
export default {
    namespaced: true,//用于在全局引用此文件里的方法时标识这一个的文件名
    state,
    getters,
    mutations,
    actions
}